package Abstract;

import java.util.HashSet;

public class Constant {
	/**
	 *A constant is a number with a specific name, a bunch of names are allowed
	 */
public Constant(String name,Number number){
	/**
	 *basic Constant constructor, it has just one name and one number
	 */
	addName(name);
	_number=number;
}
public Constant(String[] names,Number number){
	/**
	 *complex constructor used to add a bunch of names at once
	 *IE Φ
	 *	phi=new Constant({phi,fi}1.6); 
	 */
	_number=number;
	for(String name:names){
		_names.add(name);
	}
}
public Boolean addName(String name){
	if(_names.contains(name))
		return false;
	_names.add(name);
	return true;
}
	protected HashSet<String> _names;
	protected final Number _number;
	//the number has been made final to prevent malfunction 
}
